package com.fita.wechat.dao;

import java.util.List;

import com.demo2do.core.persistence.annotation.Dao;
import com.demo2do.core.persistence.annotation.Query;
import com.demo2do.core.persistence.annotation.Variable;
import com.fita.entity.set.Set;
import com.fita.entity.set.SetStatus;

/**
 * 
 * @author dan
 *
 */
@Dao("hibernate")
public interface SetDao {
    
    /**
     * 
     * @param status
     * @return
     */
    @Query("FROM Set Where disabled = false AND status = :status")
    public List<Set> list(@Variable("status") SetStatus status);
    
    /**
     * 
     * @param code
     * @return
     */
    @Query("FROM Set Where disabled = false AND code = :code")
    public Set load(@Variable("code") String code);

}
